package com.designpatterns.observer.concretesubject;

import com.designpatterns.observer.observer.Policeman;
import com.designpatterns.observer.subject.Citizen;

/**
 * HuangPuCitizen Class extends Citizen abstract Class
 * @see Citizen
 *
 * @author Haiqi.Wang
 * @since 2013-6-9下午5:27:06
 */
public class HuangPuCitizen extends Citizen {
	
	public HuangPuCitizen(Policeman pol) {
		setPoliceman();
		register(pol);
	}

	@Override
	public void sendMessage(String help) {
		setHelp(help);
		for (int i = 0; i < pols.size(); i++) {
			Policeman pol = pols.get(i);
			//通知警察行动
			pol.action(this);
		}
	}

}
